<div class="modal-body"  >
    <form class="form-horizontal" method="post" name="form_duration" id="form_duration" action="${request.contextPath}/soa/baseinfo/duration/datas/save">
        <input type="hidden" id="id" name="id" value="${model.id!}">
        <input type="hidden" id="isDeleted" name="isDeleted" value="${model.isDeleted!}">
        <div class="box-body">
            <div class="form-group">
                <label for="exampleLoginName1"  class="col-sm-5 control-label">配送里程(km):从</label>
                <div class="col-sm-7">
                    <input type="text" class="form-control" id="lDistance" name="lDistance" value="${model.lDistance!}">
                </div>
            </div>

        </div>
        <div class="box-body">
            <div class="form-group">
                <label for="exampleLoginName1"  class="col-sm-5 control-label">到</label>
                <div class="col-sm-7">
                    <input type="text" class="form-control" id="rDistance" name="rDistance" value="${model.rDistance!}">
                </div>
            </div>

        </div>
        <div class="box-body">
            <div class="form-group">
                <label for="exampleLoginName1"  class="col-sm-5 control-label">配送时长</label>
                <div class="col-sm-7">
                    <input type="text" class="form-control" id="useTime" name="useTime" value="${model.useTime!}">
                </div>
            </div>

        </div>

    </form>
</div>
<script type="text/javascript">
    //表单校验及提交事件
    $('#form_duration').bootstrapValidator({
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            lDistance: {
                message: 'The name is not valid',
                validators: {
                    notEmpty: {
                        message: '配送起始里程不能为空！'
                    },
                    stringLength: {
                        min: 1,
                        max: 10,
                        message: '配送起始里程请控制在1-10个字节！'
                    }
                }
            },
            rDistance: {
                message: 'The name is not valid',
                validators: {
                    notEmpty: {
                        message: '配送结束里程不能为空！'
                    },
                    stringLength: {
                        min: 1,
                        max: 10,
                        message: '配送结束里程长度请控制在1-10个字节！'
                    }
                }
            },
            useTime: {
                message: 'The name is not valid',
                validators: {
                    notEmpty: {
                        message: '配送时长不能为空！'
                    },
                    stringLength: {
                        min: 1,
                        max: 10,
                        message: '配送时长长度请控制在1-10个字节！'
                    }
                }
            }
        }
    }).on('success.form.bv', function(e) {
        modelThat.title('正在提交..');
        ajaxSubmit($('#form_duration')[0], function(data){
            //alert(data);
            showDailog("操作成功",2000);
            //var that=$(".ui-popup-modal ui-popup-show");
            //updateUser(id);
            setTimeout(function() {
                DTrefresh();
                //table.ajax.reload(null,false);//刷新datatable页面  table对应建表的var 命名
                modelThat.close().remove();
            }, 1000);
            return false;
        });

    });
</script>     
